Call Variables

A call variable stores specific information of a SIP message on a per call basis and changes when a new call is made (i.e., stored only throughout the lifetime of a specific call). The stored information can be, for example, the value of the SIP Contact header.

Local variables can be used per call: src (source) or dst (destination) references (see note below) which can be stored in the call leg.

Syntax:

var.call.src|dst.<Variable Name>

where:

src denotes the call source variable.
dst denotes the call destination variable.
<Variable Name> specifies the name of the variable. You can also use hard-coded variable names for the following functionality:
Retrieving values from SIP headers  for specific CDR fields when customizing the CDR format (see Call Variable for Obtaining CDR Field Value from SIP Header).
Playing a background tone (defined in the PRT file) to the call parties in an SBC call (see Call Variable for Playing Background Tone).
Defining maximum call duration (see Call Variable for Maximum Call Duration).
The var.call.src and var.call.dst depend on the context in which they are used – incoming or outgoing leg. The var.call.dst is obtained from the current leg; var.call.src is obtained from the peer leg. Therefore, if var.call.src is used for the incoming leg (IP Group's 'Inbound Message Manipulation Set' parameter), the variable is from the outgoing leg, which is the peer of the current leg. If var.call.src is used for the outgoing leg (IP Group's 'Outbound Message Manipulation Set' parameter), the variable is from the incoming leg (source), which is the peer of the current leg.
Information stored in the call variable is only valid for the duration of the call.

For example:

1. Store a value in a call variable (store the subject URI parameter value of the To header):
MessageManipulations 0 = 0, Invite.Request, , var.call.dst.My-Call, 2, header.to.url.param.subject, 0;
2. Use the stored value (allocate a Subject header for the 200 OK response for the same call and assign it the stored value):
MessageManipulations 0 = 0, Invite.response.200, , header.subject, 0, var.call.dst.My-Call, 0;

The following table provides additional configuration examples of using call variables in Message Manipulation rules.

Examples of Call Variables

Message Type

Condition

Action
Subject

Action Type

Action Value

invite

param.message.sdp.rtpmode=='sendrecv'

Var.Call.Src.My-Call

Modify

'1'

invite
.response.200

var.call.dst.My-Call=='1'

Param.Message.Sdp.rtpmode

Modify

'sendonly'